$OpenBSD: patch-sys_oss_gstosshelper_c,v 1.4 2010/04/28 08:03:23 ajacoutot Exp $
--- sys/oss/gstosshelper.c.orig	Fri Apr 16 19:10:22 2010
+++ sys/oss/gstosshelper.c	Wed Apr 28 09:06:23 2010
@@ -228,6 +228,7 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
   int exact_rates = 0;
   gboolean checking_exact_rates = TRUE;
   int n_checks = 0;
+  int max_exact_matches = 20;
   gboolean result = TRUE;
 
   ranges = g_queue_new ();
@@ -255,6 +256,12 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
      * driver is seriously buggy, and probably doesn't work with other
      * media libraries/apps.  */
     probe->min = gst_oss_helper_rate_check_rate (probe, 8000);
+    if (probe->min == -1)
+        probe->min = gst_oss_helper_rate_check_rate (probe, 32000);
+    if (probe->min == -1)
+        probe->min = gst_oss_helper_rate_check_rate (probe, 44100);
+    if (probe->min == -1)
+        probe->min = gst_oss_helper_rate_check_rate (probe, 48000);
     probe->max = gst_oss_helper_rate_check_rate (probe, 48000);
   }
   if (probe->min == -1 || probe->max == -1) {
@@ -279,19 +286,15 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
     }
     n_checks++;
 
-    if (mid == mid_ret && checking_exact_rates) {
-      int max_exact_matches = 20;
-
+    if (mid == mid_ret && checking_exact_rates)
       exact_rates++;
-      if (exact_rates > max_exact_matches) {
-        GST_DEBUG ("got %d exact rates, assuming all are exact",
-            max_exact_matches);
-        result = FALSE;
-        g_free (range);
-        break;
-      }
-    } else {
-      checking_exact_rates = FALSE;
+
+    if (exact_rates > max_exact_matches) {
+      GST_DEBUG ("got %d exact rates, assuming all are exact",
+		 max_exact_matches);
+      result = FALSE;
+      g_free (range);
+      break;
     }
 
     /* Assume that the rate is arithmetically rounded to the nearest
